package com.cloudbroker.bcs.platform.ltb.middle.service.impl;

import com.cloudbroker.bcs.common.dao.base.DAOBase;
import com.cloudbroker.bcs.platform.ltb.common.config.ConfigValues;
import com.cloudbroker.bcs.platform.ltb.middle.dao.AppUserTagDAO;
import com.cloudbroker.bcs.platform.ltb.middle.entity.AppUserTags;
import com.cloudbroker.bcs.platform.ltb.middle.service.AppUserTagService;
import com.cloudbroker.bcs.platform.ltb.middle.service.base.TenantServiceImplBase;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by daibd19671 on 2016/12/16.
 */
@Service
public class AppUserTagServiceImpl extends TenantServiceImplBase<AppUserTags, String> implements AppUserTagService {
    @Resource
    private AppUserTagDAO appUserTagDAO;

    @Override
    protected DAOBase<AppUserTags, String> getDAO() {
        return appUserTagDAO;
    }

    public void addAppUserTags(AppUserTags appUserTags) {
        appUserTags.setMycat_flag(ConfigValues.getMycatFlag());
        appUserTagDAO.addAppUserTags(appUserTags);
    }

    public List<AppUserTags> queryAppUserTag(AppUserTags appUserTags) {
        return appUserTagDAO.queryAppUserTag(appUserTags);
    }

    public void deleteTag(AppUserTags appUserTags) {
        appUserTagDAO.deleteTag(appUserTags);
    }


}
